function[T] = sdiag(t)

T = spdiags(t(:),0,numel(t),numel(t));